Optimal. Leaf size=60 \[ \frac {(2 A-B) \sin (c+d x)}{a d}-\frac {(A-B) \sin (c+d x)}{d (a \sec (c+d x)+a)}-\frac {x (A-B)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {4020, 3787, 2637, 8} \[ \frac {(2 A-B) \sin (c+d x)}{a d}-\frac {(A-B) \sin (c+d x)}{d (a \sec (c+d x)+a)}-\frac {x (A-B)}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2637
Rule 3787
Rule 4020
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) (A+B \sec (c+d x))}{a+a \sec (c+d x)} \, dx &=-\frac {(A-B) \sin (c+d x)}{d (a+a \sec (c+d x))}+\frac {\int \cos (c+d x) (a (2 A-B)-a (A-B) \sec (c+d x)) \, dx}{a^2}\\ &=-\frac {(A-B) \sin (c+d x)}{d (a+a \sec (c+d x))}-\frac {(A-B) \int 1 \, dx}{a}+\frac {(2 A-B) \int \cos (c+d x) \, dx}{a}\\ &=-\frac {(A-B) x}{a}+\frac {(2 A-B) \sin (c+d x)}{a d}-\frac {(A-B) \sin (c+d x)}{d (a+a \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.38, size = 76, normalized size = 1.27 \[ \frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right ) (d x (B-A)+A \sin (c+d x))+(A-B) \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )\right )}{a d (\cos (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 63, normalized size = 1.05 \[ -\frac {{\left (A - B\right )} d x \cos \left (d x + c\right ) + {\left (A - B\right )} d x - {\left (A \cos \left (d x + c\right ) + 2 \, A - B\right )} \sin \left (d x + c\right )}{a d \cos \left (d x + c\right ) + a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 79, normalized size = 1.32 \[ -\frac {\frac {{\left (d x + c\right )} {\left (A - B\right )}}{a} - \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} - \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.09, size = 108, normalized size = 1.80 \[ \frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {2 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {2 A \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 143, normalized size = 2.38 \[ -\frac {A {\left (\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{{\left (a + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - B {\left (\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.00, size = 65, normalized size = 1.08 \[ \frac {2\,A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )}-\frac {x\,\left (A-B\right )}{a}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B\right )}{a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A \cos {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________